home *** CD-ROM | disk | FTP | other *** search
/ Internet.Works 39 / Issue 39.iso / pc / PCSoftware / EditML Pro 1.0 / EditMLProv1.0Setup.exe / Main / EditML.chm / samples / employee.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2000-10-09  |  1.6 KB  |  37 lines

  1. <?xml version="1.0"?>
  2. <!-- Generic stylesheet for viewing XML -->
  3. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  4.   <!-- This template will always be executed, even if this stylesheet is not run on the document root -->
  5.   <xsl:template>
  6.     <DIV STYLE="font-family:Courier; font-size:10pt; margin-bottom:2em">
  7.       <!-- Scoped templates are used so they don't interfere with the "kick-off" template. -->
  8.       <xsl:apply-templates select=".">
  9.         <xsl:template><xsl:apply-templates/></xsl:template>
  10.  
  11.         <xsl:template match="*">
  12.           <DIV STYLE="margin-left:1em; color:gray">
  13.             <<xsl:node-name/><xsl:apply-templates select="@*"/>/>
  14.           </DIV>
  15.         </xsl:template>
  16.  
  17.         <xsl:template match="*[node()]">
  18.           <DIV STYLE="margin-left:1em">
  19.             <SPAN STYLE="color:gray"><<xsl:node-name/><xsl:apply-templates select="@*"/>></SPAN><xsl:apply-templates select="node()"/><SPAN STYLE="color:gray"></<xsl:node-name/>></SPAN>
  20.           </DIV>
  21.         </xsl:template>
  22.  
  23.         <xsl:template match="@*">
  24.           <SPAN STYLE="color:navy"> <xsl:node-name/>="<SPAN STYLE="color:black"><xsl:value-of /></SPAN>"</SPAN>
  25.         </xsl:template>
  26.  
  27.         <xsl:template match="pi()">
  28.           <DIV STYLE="margin-left:1em; color:maroon"><?<xsl:node-name/><xsl:apply-templates select="@*"/>?></DIV>
  29.         </xsl:template>
  30.  
  31.         <xsl:template match="cdata()"><pre><![CDATA[<xsl:value-of />]]></pre></xsl:template>
  32.  
  33.         <xsl:template match="textNode()"><xsl:value-of /></xsl:template>
  34.       </xsl:apply-templates>
  35.     </DIV>
  36.   </xsl:template>
  37. </xsl:stylesheet>